package com.aleaho.cftrack.http.api;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.aleaho.cftrack.http.ApiResponseWraper;
import com.aleaho.cftrack.http.ApiResponseWraperNoList;
import com.aleaho.cftrack.http.RequestParam;
import com.aleaho.cftrack.http.entity.DepartmentTreeEntity;

import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * @author Aleaho
 * @version 1.0
 * @date 2017/11/13
 * @desc
 */

public interface DepartmentTreeApi {

    /**
     * 从服务器获得组织人员信息，直接返回的数据为json arrary，
     * 所以要直接用{@link ApiResponseWraper<DepartmentTreeApi>}
     *
     * @return 返回经过解析的{@link ApiResponseWraperNoList<DepartmentTreeApi>}
     */
    @GET("DepartmentTree/")
    Observable<ApiResponseWraper<DepartmentTreeEntity>> getAllDepartmentTree();

    /**
     *从服务器获得组织人员信息，直接返回的数据为json ，
     * 所以要直接用{@link ApiResponseWraperNoList<DepartmentTreeApi>}
     * @param id    组织机构的主键ID
     * @return      解析后的Java对象。
     */
    @GET("DepartmentTree/{id}")
    Observable<ApiResponseWraperNoList<DepartmentTreeEntity>> getSingleDepartmentTree(@Path("id") int id);


}
